<?php
/**
 * Created by IntelliJ IDEA.
 * User: HXL
 * Date: 2018/5/9
 * Time: 13:27
 */
namespace app\order\model;

use think\Db;
/**
 * 制造商
 * Class Manufacturer
 * @package app\order\model
 */
class Manufacturer extends BaseModel{
    protected $tableName = 'ari_manus';

    /**
     * 模糊查询
     * @return \think\paginator\Collection
     */
    public function searchLike($search){
        $count = Db::table($this->tableName)->where('mf_id', 'like', "%$search%")
            ->whereOr('manufacturer', 'like', "%$search%")->count();
        $manus = Db::table($this->tableName)->where('mf_id', 'like', "%$search%")
            ->whereOr('manufacturer', 'like', "%$search%")->paginate(10, $count, ['query' => request()->param()]);
        return $manus;
    }




}